package com.snmp.smn.agent;

import java.net.Socket;

public class CopyFile {

	@SuppressWarnings("static-access")
	public static void main(String[] args) throws Exception {
		if (args.length != 2) {
			System.out.println("Usage: java -jar copyfile <filename> <localport>");
			System.exit(1);
		}
		
		Socket socket = new Socket("localhost", Integer.parseInt(args[1]));
		socket.getOutputStream().write(args[0].getBytes());
		
		Thread.currentThread().sleep(1000000);
	}
}
